package edu.ycxy.poetry.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.ycxy.poetry.entity.DjType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author @xin
 * @createDate 2022/3/14
 * @Description
 */
@Repository
public interface DjTypeMapper extends BaseMapper<DjType> {
    //查询古文典籍的主类型的id和姓名
    @Select("select * from vab_djtype where reid=0")
    List<DjType> selectType();

    //根据古文典籍的主类型所得的id查询古文典籍的具体类型
    @Select("select * from vab_djtype where reid=#{id}")
    List<DjType> selectByTypeId(Integer id);
}
